#! /usr/bin/env python

import rospy
from std_msgs.msg import String

def handle_msg(msg):
    rospy.loginfo("sub data: %s", msg.data)


if __name__ == "__main__":
    rospy.init_node("demo02_sub_p")
    sub = rospy.Subscriber("car", String, handle_msg, queue_size=10)
    rospy.spin()
